import os
from dotenv import load_dotenv
from app import create_app

# 加载环境变量
load_dotenv()

# 创建应用
app = create_app(os.getenv('FLASK_ENV', 'default'))

if __name__ == '__main__':
    # 开发环境启动
    app.run(
        host=app.config['HOST'],
        port=app.config['PORT'],
        debug=app.config['DEBUG'],
        threaded=False,  # 禁用多线程以支持异步

    )
